package com.member.shop.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.member.common.annotation.Excel;
import com.member.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.List;

/**
 * 资料库列表对象 sys_biz_profile
 *
 * @author lixinchen
 * @date 2024-05-09
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_biz_profile")
public class SysBizProfile extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 标题
     */
    @Excel(name = "标题")
    private String title;

    /**
     * 内容
     */
    @Excel(name = "内容")
    private  String content;

    /**
     * 封面标题（仅图片）
     */
    @Excel(name = "封面标题")
    private String coverTitle;

    /**
     * 类型（10图片库 20视频库 30文件库）
     */
    @Excel(name = "类型", readConverterExp = "1=0图片库,2=0视频库,3=0文件库")
    private Integer type;

    /**
     * 分类id
     */
    @Excel(name = "分类id")
    private Long categoryId;

    /**
     * 封面
     */
    @Excel(name = "封面")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String cover;

    /**
     * 分享封面
     */
    @Excel(name = "分享封面")
    private String shareCover;

    /**
     * 排序
     */
    @Excel(name = "排序")
    private Integer sort;
    /**
     * 阅读次数
     */
    @Excel(name = "阅读次数")
    private Integer readCount;

    /**
     * 是否上架（0上架 1下架）
     */
    @Excel(name = "是否上架", readConverterExp = "0=上架,1=下架")
    private Integer status;


    /**
     * 资料库资源
     */
    @TableField(exist = false)
    private List<SysBizProfileSource> profileSourceList;


    /**
     * 资料库分类名称
     */
    @TableField(exist = false)
    private String profileCategoryName;
}
